<p>This rule is deprecated, and will eventually be removed.</p>
<h2>Why is this an issue?</h2>
<p>Extra semicolons (<code>;</code>) are usually introduced by mistake, for example because:</p>
<ul>
  <li> It was meant to be replaced by an actual statement, but this was forgotten. </li>
  <li> There was a typo which lead the semicolon to be doubled, i.e. <code>;;</code>. </li>
  <li> There was a misunderstanding about where semicolons are required or useful. </li>
</ul>
<h3>Noncompliant code example</h3>
<pre>
var x = 1;; // Noncompliant

function foo() {
};  // Noncompliant
</pre>
<h3>Compliant solution</h3>
<pre>
var x = 1;

function foo() {
}
</pre>
<h3>Exceptions</h3>
<p>This rule does not apply when the semicolon is after a line break and before <code>(</code> or <code>[</code> as it is often used in semicolon-less
style.</p>
<pre>
var hello = 'Hello'
var world = 'World!'
var helloWorld = hello + ' ' + world
;[...helloWorld].forEach(c =&gt; console.log(c))
</pre>
<pre>
var a = 1
var b = 2 * a
;(a + b).toString()
</pre>
<h2>Resources</h2>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://eslint.style/">ESLint Stylistic</a> - Rule <a href="https://eslint.style/rules/no-extra-semi">no-extra-semi</a> </li>
</ul>
